#!/usr/bin/env bash

echo '=====开始更新DIDIOK镜像====='
pwd
echo '=====开始关闭运行的容器====='
bash down.sh

echo '===== 删除DIDIOK镜像====='

echo '=====删除didiok-admin====='
docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-admin
#echo '=====删除didiok-community====='
#docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-community
#echo '=====删除didiok-file====='
#docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-file
echo '=====删除didiok-gateway====='
docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-gateway
#echo '=====删除didiok-rank====='
#docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-rank
echo '=====删除didiok-search====='
docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-search
echo '=====删除didiok-sms====='
docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-sms
echo '=====删除didiok-user====='
docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-user
echo '=====删除didiok-wechat====='
docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-wechat
#echo '=====删除didiok-pay====='
#docker rmi registry.cn-hangzhou.aliyuncs.com/didiok/didiok-pay


echo '=====开始拉取DIDIOK后端镜像====='
bash pull_images.sh

echo '=====开始运行DIDIOK镜像====='
bash run.sh
